package com.niiwoo.civet.trade.dao.mapper.credit;

import com.niiwoo.civet.trade.dao.entity.credit.CreditProjectInvestor;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CreditProjectInvestorMapperExt extends CreditProjectInvestorMapper {

    List<CreditProjectInvestor> selectByUserId(@Param("userId") String userId,@Param("offset") int offset,@Param("rows") int rows);

    List<CreditProjectInvestor> selectByProjectId(@Param("projectId") Long projectId);

    List<CreditProjectInvestor> selectByProjectIdAndUserId(@Param("projectId") Long projectId, @Param("userId") String userId);

    /**
     * 我的投资总数.
     *
     * @param userId
     * @return
     */
    int selectMyInvestCount(String userId);
}